<%--
  Created by IntelliJ IDEA.
  User: Gaara_XHG
  Date: 2020/9/26
  Time: 20:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>上机题目</title>
    <link rel="stylesheet" href="${path}/plugins/bootstrap-3.3.7-dist/css/bootstrap.css">
</head>
<body>
<table>
    <tr>
        <td> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">创建用户</button>
        </td>
    </tr>
    <tr>
        <td>按姓名查找：</td>
        <td><input type="text" id='search_input'></td>
        <td>
            <select  id='statusTypeSelect' class="form-control">
                <option selected value="0">有效</option>
                <option value="1">无效</option>
            </select>
        </td>
        <td><input type="button" value="search" id='search_btn'></td>
    </tr>
    <tr>
        <td>账户</td>
        <td>姓名</td>
        <td>密码</td>
        <td>状态</td>
        <td>删除</td>
        <td>修改</td>
    </tr>
    <c:forEach items="${cusus}" var="c" varStatus="vs">
        <tr>
            <td>${c.id}</td>
            <td>${c.cname}</td>
            <td>${c.cpassword}</td>
            <td>${c.cstatus}</td>
            <td>
                <a class="text-danger" href='${path}/customer/del?id=${c.id}'><span>删除</span></a>
            </td>
            <%--<td><a class="text-danger" href='${path}/cust/del?id=${c.id}'><span>删除</span></a></td>--%>
            <td><a class="text-danger "><span>修改</span></a></td>
        </tr>
    </c:forEach>
</table>

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">创建用户</h4>
            </div>
            <div class="modal-body">
                <table>
                    <tr><td><span>账户：</span><input type="text" id="cust_id" placeholder="纯数字(至少一位数)"></td></tr>
                    <tr><td><span>姓名：</span><input type="text" id="cust_cname" placeholder=""></td></tr>
                    <tr><td><span>密码：</span><input type="text" id="cust_cpwd" placeholder=""></td></tr>
                    <tr><td><span>状态：</span><input type="text" id="cust_stat" placeholder="0-有效，1-无效"></td></tr>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="creat_cust">创建</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<script src="${path}/plugins/jquery/jquery.min.js"></script>
<script src="${path}/plugins/bootstrap-3.3.7-dist/js/bootstrap.js"></script>

<script src="${path}/js/index.js"></script>

</body>
</html>
